<div id="contact-form">
  <h3>adjudica roles</h3>
  <%= form_for @contact do |f| %>
    <%= hidden_field_tag "contact[relation_ids][]", "0" %>

    <% if @contact.errors.any? %>
      <div id="error_explanation">
        <h2><%= t 'contact.error_count', :count => @contact.errors.count %></h2>

        <ul>
        <% @contact.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
        </ul>
      </div>
    <% end %>

    <ul>
    <% current_subject.relation_customs.each do |relation| %>
      <li>
      <%= check_box_tag "contact[relation_ids][]", relation.id, f.object.relation_ids.include?(relation.id), :id => "contact_relation_ids_#{ relation.id }" %><%= label_tag "contact_relation_ids_#{ relation.id }", relation.name %>
      </li>
    <% end %>

    <div id="relation-new">
      <%= link_to t('contact.type.new'), relation_customs_path %>
    </div>
    </ul>

    <div id="contact-message">
      <%= f.label :message,:class =>"name_text_area" %>
      <%= f.text_area :message, :class =>"new_contact_text_area" %>
    </div>

    <div id="contact-submit">
      <%= submit_tag t("contact.#{ f.object.action }.submit"), :class => "btn" %>
    </div>
  <% end %>
</div>
